package com.ruoyi.site.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.site.mapper.PlansMapper;
import com.ruoyi.site.domain.Plans;
import com.ruoyi.site.service.IPlansService;

/**
 * 订阅计划Service业务层处理
 * 
 * @author chuckeytang
 * @date 2025-08-17
 */
@Service
public class PlansServiceImpl implements IPlansService 
{
    @Autowired
    private PlansMapper plansMapper;

    /**
     * 查询订阅计划
     * 
     * @param planId 订阅计划主键
     * @return 订阅计划
     */
    @Override
    public Plans selectPlansByPlanId(Long planId)
    {
        return plansMapper.selectPlansByPlanId(planId);
    }

    /**
     * 查询订阅计划列表
     * 
     * @param plans 订阅计划
     * @return 订阅计划
     */
    @Override
    public List<Plans> selectPlansList(Plans plans)
    {
        return plansMapper.selectPlansList(plans);
    }

    /**
     * 新增订阅计划
     * 
     * @param plans 订阅计划
     * @return 结果
     */
    @Override
    public int insertPlans(Plans plans)
    {
        return plansMapper.insertPlans(plans);
    }

    /**
     * 修改订阅计划
     * 
     * @param plans 订阅计划
     * @return 结果
     */
    @Override
    public int updatePlans(Plans plans)
    {
        return plansMapper.updatePlans(plans);
    }

    /**
     * 批量删除订阅计划
     * 
     * @param planIds 需要删除的订阅计划主键
     * @return 结果
     */
    @Override
    public int deletePlansByPlanIds(Long[] planIds)
    {
        return plansMapper.deletePlansByPlanIds(planIds);
    }

    /**
     * 删除订阅计划信息
     * 
     * @param planId 订阅计划主键
     * @return 结果
     */
    @Override
    public int deletePlansByPlanId(Long planId)
    {
        return plansMapper.deletePlansByPlanId(planId);
    }
}
